
\begin{tikzpicture}[>=latex,line join=bevel,]
  \pgfsetlinewidth{1bp}
%%
\pgfsetcolor{black}
  % Edge: main -> q1
  \draw [->] (36.967bp,252.11bp) .. controls (45.03bp,247.3bp) and (55.34bp,241.14bp)  .. (73.287bp,230.43bp);
  \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  \pgfsetstrokecolor{strokecol}
  \draw (59.693bp,258.92bp) node {main};
  % Edge: q6 -> exit
  \draw [->] (596.03bp,227.33bp) .. controls (604.37bp,230.81bp) and (615.2bp,235.32bp)  .. (634.17bp,243.23bp);
  \draw (604.48bp,247.35bp) node {q6};
  % Edge: q2 -> q3
  \draw [->] (310.46bp,210.02bp) .. controls (321.22bp,209.96bp) and (335.59bp,209.89bp)  .. (358.24bp,209.76bp);
  \draw (329.22bp,220.92bp) node {q2};
  % Edge: r2 -> q6
  \draw [->] (526.78bp,196.73bp) .. controls (535.86bp,200.8bp) and (548.3bp,206.37bp)  .. (568.37bp,215.37bp);
  \draw (547.93bp,190.97bp) node {r2};
  % Edge: q1 -> c1
  \draw [->] (99.789bp,216.85bp) .. controls (108.91bp,212.89bp) and (121.07bp,207.61bp)  .. (141.03bp,198.93bp);
  \draw (110.69bp,195.94bp) node {q1};
  % Edge: c2 -> e
  \pgfsetcolor{green}
  \draw [->] (230.44bp,86.494bp) .. controls (229.71bp,100.02bp) and (228.42bp,123.55bp)  .. (226.93bp,150.88bp);
  \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  \pgfsetstrokecolor{strokecol}
  \draw (216.97bp,113.47bp) node {c2};
  % Edge: x -> r1
  \pgfsetcolor{red}
  \draw [->] (440.96bp,149.47bp) .. controls (440.07bp,136.36bp) and (438.48bp,112.66bp)  .. (436.63bp,85.198bp);
  \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  \pgfsetstrokecolor{strokecol}
  \draw (421.14bp,123.45bp) node {x: c1, };
  % Edge: x -> r2
  \pgfsetcolor{red}
  \draw [->] (453.56bp,164.43bp) .. controls (463.83bp,168.94bp) and (478.9bp,175.57bp)  .. (500.79bp,185.19bp);
  \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  \pgfsetstrokecolor{strokecol}
  \draw (479.5bp,156.75bp) node {x: c2, };
  % Edge: q4 -> q5
  \draw [->] (358.01bp,21.382bp) .. controls (346.75bp,21.449bp) and (331.51bp,21.541bp)  .. (308.25bp,21.68bp);
  \draw (338.26bp,10.5bp) node {q4};
  % Edge: q3 -> x
  \draw [->] (385.54bp,201.34bp) .. controls (395.97bp,193.49bp) and (411.77bp,181.62bp)  .. (432.03bp,166.38bp);
  \draw (413.74bp,199.9bp) node {q3};
  % Edge: q5 -> c2
  \draw [->] (281.69bp,30.936bp) .. controls (272.59bp,38.991bp) and (259.15bp,50.881bp)  .. (240.82bp,67.099bp);
  \draw (254.05bp,33.664bp) node {q5};
  % Edge: c1 -> e
  \pgfsetcolor{green}
  \draw [->] (167.61bp,187.13bp) .. controls (178.27bp,182.3bp) and (193.45bp,175.41bp)  .. (215.18bp,165.56bp);
  \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  \pgfsetstrokecolor{strokecol}
  \draw (181.67bp,165.49bp) node {c1};
  % Edge: e -> q2
  \draw [->] (235.84bp,167.37bp) .. controls (245.77bp,174.65bp) and (261.71bp,186.31bp)  .. (282.6bp,201.6bp);
  \draw (248.13bp,191.5bp) node {e};
  % Edge: r1 -> q4
  \draw [->] (426.28bp,66.221bp) .. controls (417.32bp,58.481bp) and (403.73bp,46.742bp)  .. (384.86bp,30.44bp);
  \draw (399.48bp,62.712bp) node {r1};
  % Node: q1
\begin{scope}
  \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  \pgfsetstrokecolor{strokecol}
  \draw (86bp,223bp) ellipse (16bp and 12bp);
  \draw (85.933bp,222.87bp) node {q1};
\end{scope}
  % Node: q3
\begin{scope}
  \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  \pgfsetstrokecolor{strokecol}
  \draw (374bp,210bp) ellipse (16bp and 12bp);
  \draw (374.45bp,209.68bp) node {q3};
\end{scope}
  % Node: q2
\begin{scope}
  \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  \pgfsetstrokecolor{strokecol}
  \draw (294bp,210bp) ellipse (16bp and 12bp);
  \draw (294.22bp,210.11bp) node {q2};
\end{scope}
  % Node: e
\begin{scope}
  \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  \pgfsetstrokecolor{strokecol}
  \draw (226bp,160bp) ellipse (13bp and 10bp);
  \draw (226.41bp,160.47bp) node {e};
\end{scope}
  % Node: q4
\begin{scope}
  \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  \pgfsetstrokecolor{strokecol}
  \draw (374bp,21bp) ellipse (16bp and 12bp);
  \draw (374.26bp,21.284bp) node {q4};
\end{scope}
  % Node: r2
\begin{scope}
  \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  \pgfsetstrokecolor{strokecol}
  \draw (514bp,191bp) ellipse (15bp and 11bp);
  \draw (513.98bp,190.99bp) node {r2};
\end{scope}
  % Node: q6
\begin{scope}
  \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  \pgfsetstrokecolor{strokecol}
  \draw (582bp,222bp) ellipse (16bp and 12bp);
  \draw (582.04bp,221.5bp) node {q6};
\end{scope}
  % Node: r1
\begin{scope}
  \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  \pgfsetstrokecolor{strokecol}
  \draw (436bp,75bp) ellipse (15bp and 11bp);
  \draw (435.91bp,74.543bp) node {r1};
\end{scope}
  % Node: exit
\begin{scope}
  \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  \pgfsetstrokecolor{strokecol}
  \draw (650bp,250bp) ellipse (19bp and 11bp);
  \draw (649.55bp,249.64bp) node {exit};
\end{scope}
  % Node: x
\begin{scope}
  \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  \pgfsetstrokecolor{strokecol}
  \draw (442bp,159bp) ellipse (14bp and 10bp);
  \draw (441.61bp,159.18bp) node {x};
\end{scope}
  % Node: c2
\begin{scope}
  \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  \pgfsetstrokecolor{strokecol}
  \draw (231bp,76bp) ellipse (16bp and 11bp);
  \draw (231.03bp,75.765bp) node {c2};
\end{scope}
  % Node: c1
\begin{scope}
  \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  \pgfsetstrokecolor{strokecol}
  \draw (154bp,193bp) ellipse (16bp and 11bp);
  \draw (154.4bp,193.12bp) node {c1};
\end{scope}
  % Node: main
\begin{scope}
  \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  \pgfsetstrokecolor{strokecol}
  \draw (23bp,260bp) ellipse (22bp and 11bp);
  \draw (23bp,260.45bp) node {main};
\end{scope}
  % Node: q5
\begin{scope}
  \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  \pgfsetstrokecolor{strokecol}
  \draw (292bp,22bp) ellipse (16bp and 12bp);
  \draw (292.04bp,21.777bp) node {q5};
\end{scope}
%
\end{tikzpicture}
